<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Curl Conversion Home</title>
    <link rel="icon" href="{{ url_for('static', filename='ico/favicon_curl.png') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/curl_input.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/alert_msg.css') }}">

    <!-- 弹窗, 复制 -->
    <script type="module" src="{{ url_for('static', filename='js/common.js') }}"></script>
    <!-- 调用接口 -->
    <script type="module" src="{{ url_for('static', filename='js/commom_req.js') }}"></script>
    <!-- 记忆上次的输入 -->
    <script type="module" src="{{ url_for('static', filename='js/memory_curl.js') }}"></script>
    <!-- 复制用例格式 -->
    <script type="module" src="{{ url_for('static', filename='js/curl_input.js') }}"></script>
</head>


<body>
<h2>输入 curl 命令 : </h2>
<form method="post" action="/curl_to_py">
    <textarea id="curl_command" name="curl_command" rows="30" cols="80" placeholder="请输入或粘贴 Curl 命令"></textarea><br>
    <input type="submit" value="Python">
    <button type="button" onclick="curlToPy('/curl_to_simple_py')">Py</button>
    <button type="button" onclick="curlToExcel('/curl_to_table')">Excel</button>
    <!--
    <button type="button" onclick="copyTestCodeToClipboard()">复制用例格式</button>
    -->
    <button type="button" onclick="submitBeautifyJson('/beautify_json')">美化Json</button>
    <button type="button" onclick="submitBeautifyJson('/beautify_json_page')">Json美化</button>
    <button type="button" onclick="getVerifyCode('beta')">Beta</button>
    <button type="button" onclick="getVerifyCode('test')">Test</button>
    <button type="button" onclick="getVerifyCode('pre')">Pre</button>
    <button type="button" onclick="uncredited()">银儿</button>
    <button type="button" onclick="uncredited_pic()">图儿</button>
    <button type="button" onclick="form_api('/code/codes')">脚本</button>
</form>
<div id="custom-alert" class="custom-alert"></div>
<br>


<!-- 验证码信息弹框展示 -->
<div id="verifyCodeTable" style="display:none; position:absolute; top:50%; left:50%; transform:translate(-50%, -50%);">
    <div id="verifycode-content">
        <h1 id="verifycode-venv">验证码信息</h1>
        <h3 id="countdown">自动关闭倒计时 : 5</h3>
        <table id="verificationTable">
            <thead>
            <tr>
                <th>手机号</th>
                <th>验证码</th>
                <th>创建时间</th>
            </tr>
            </thead>
            <tbody id="verify-data-body">
            </tbody>
        </table>
        <button id="closeVerifyCodeTable">返回</button>
    </div>
</div>


<h2 style="display: inline;">请输入关键信息 :</h2>
<span style="font-size: smaller; font-style: italic; margin-left: 5px;"> { ps: 以下信息带记忆, 重复信息不用反复输入, 美滋滋 ~ }</span>
<form class="form_case_id">
    <br>
    <div class="form-group">
        <!-- <label for="sheet_name">sheet_name</label>-->
        表格页签 :<input type="text" id="sheet_name" name="sheet_name" class="case_info" placeholder="请输入Sheet页名称">
    </div>
    <div class="form-group">
        <!-- <label for="case_id">case_id</label>-->
        用例编号 :<input type="text" id="case_id" name="case_id" class="case_info" placeholder="请输入用例编号">
    </div>
    <div class="form-group">
        <!-- <label for="case_name">case_name</label>-->
        接口名称 :<input type="text" id="api_name" name="api_name" class="case_info" placeholder="请输入接口名称">
    </div>
    <div class="form-group">
        <!-- <label for="model">model</label>-->
        所属模块 :<input type="text" id="model" name="case_model" class="case_info" placeholder="请输入所属模块">
    </div>
    <div class="form-group">
        <!-- <label for="model">model</label>-->
        用例标题 :<input type="text" id="case_title" name="case_title" class="case_info" placeholder="请输入用例标题 ( 默认接口名+成功 )">
    </div>
</form>
<button type="button" onclick="submitToPytestExcel('/curl_to_pytest_excel')">全病程</button>
<button type="button" onclick="submitToPytestExcel('/curl_to_gcp')">GCP</button>
<button type="button" onclick="submitToPytestExcel('/curl_to_edc')">DEC</button>
</body>
</html>